package org.uu.serviceconsume.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;
import org.uu.service.IHelloService;

@Component
public class HelloConsumer {
    //@Reference(url = "dubbo://127.0.0.1:20880") // 指定具体的 dubbo 服务，不需要依赖 zookeeper
    @Reference
    private IHelloService iHelloService;

    public String sayHello(String name){
        String result = iHelloService.say(name);
        System.out.println("name="+name+", result="+result);
        return result;
    }
}
